/**
 * Created by Juvid on 2017/6/27.
 */
import React, {
    Component,
    PropTypes,
} from 'react';
import {
    TouchableHighlight,
    Text
} from 'react-native';

export default class JuButton extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        // 根据当前showText的值决定是否显示text内容
        let underlayColor = this.props.underlayColor?this.props.underlayColor:'#eee';
        return (
            <TouchableHighlight style={this.props.style} underlayColor={underlayColor} onPress = {(e) => {
                return this.props.onTouch(e)}}
            >
                <Text>{this.props.title}</Text>
            </TouchableHighlight>
        );
    }
}